﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListaTrilha.aspx.cs" Inherits="Sebrae.Academico.Trilhas.WebForms.Cadastros.ListaTrilha" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <fieldset><legend>Filtros para o formulário</legend>
    <table>
        <tr>
        <td>
            <asp:Label ID="Label1" runat="server" Text="Nome"></asp:Label></td>
        <td>
            <asp:TextBox ID="txtFiltroNome" runat="server" Width="435px"></asp:TextBox>
        </td>
        </tr>
        <tr><td colspan=2>
            <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar" 
                onclick="btnPesquisa_Click" />
            </td></tr>
    </table></fieldset>
    <p />
    <div>
    
        <asp:GridView ID="dgTrilha" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True" 
            EnableTheming="True" onrowdeleting="dgTrilha_RowDeleting" 
            DataKeyNames="ID" onselectedindexchanged="dgTrilha_SelectedIndexChanged"
            >
            <Columns>
                <asp:CommandField SelectText="Editar" ShowSelectButton="True" />
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="Excluir" OnClientClick="return confirm('Deseja Realmente Excluir este Registro?');"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
               
                <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
            </Columns>
        </asp:GridView>
    
        <asp:ObjectDataSource ID="dgObjtrilha" runat="server" 
            DataObjectTypeName="Sebrae.Academico.Trilhas.Dominio.Classes.Trilha" 
            DeleteMethod="ExcluirTrilha" InsertMethod="IncluirTrilha" 
            SelectMethod="ObterTrilhas" TypeName="Sebrae.Academico.Trilhas.BP.ManterTrilha" 
            UpdateMethod="AlterarTrilha"></asp:ObjectDataSource>
    
    </div>
    <br />
    <div>
        <asp:Button ID="btnNovo" runat="server" Text="Inserir Novo Registro" 
            onclick="btnNovo_Click" /> 
    </div>
    </form>
</body>
</html>
